# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=nymphcast-mediaserver
pkgver=0.1
pkgrel=2
arch="all"
url="http://nyanko.ws/product_nymphcast.php"
pkgdesc="Media server for the NymphCast ecosystem"
license="BSD-3-Clause"
depends="avahi"
makedepends="
	libnymphcast-dev
	nymphrpc-dev
	poco-dev
	"
subpackages="$pkgname-nftables::noarch"
source="https://github.com/MayaPosch/NymphCast-MediaServer/archive/v$pkgver/nymphcast-mediaserver-v$pkgver.tar.gz
	60_nymphcast-mediaserver.nft
	"
options="!check" # No tests
builddir="$srcdir/NymphCast-MediaServer-$pkgver"

build() {
	make
}

package() {
	make DESTDIR="$pkgdir" PREFIX=/usr install
}

nftables() {
	pkgdesc="$pkgdesc (nftables rules)"
	install_if="$pkgname=$pkgver-r$pkgrel nftables"

	install -Dm644 -t "$subpkgdir"/etc/nftables.d "$srcdir"/60_nymphcast-mediaserver.nft
}

sha512sums="
98b68f4dc86b7c1f2b16fbee3d3fdc3004d50daf24478c5ff17edd839ad4929f0e60732fbff984b0e52ad7961860a3c2a6291d3ff738a7ffc45aa3f3180bc354  nymphcast-mediaserver-v0.1.tar.gz
28b84bee510cc8d58ccea9a8f1bb17f61c1c8cee44683b1674506e62c1b4187dfa410150cfffb41a6d803a081ff93d3039afedd9bac602edb8e2ec26bd053d43  60_nymphcast-mediaserver.nft
"
